package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.Dept;
import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpExpr;
import com.itheima.pojo.EmpQueryParam;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.Arrays;
import java.util.List;

public interface EmpMapper {



    public List<Emp> list(EmpQueryParam e);


    //2.2 删除员工
    void deleteEmployee(@Param("ids")List<Integer> ids);

    void addEmployee(Emp emp);

    Integer getRecentInsertedEmpId();

    //根据id查找
    Emp findById(@Param("id") Integer id);

    void modifyEmployee(Emp emp);


    List<Emp> queryAllEmployees();


    /**
     * 根据用户名和密码查询员工信息
     */
    @Select("select * from emp where username=#{username} and password=#{password}")
    Emp findEmpByUsernameAndPassword(@Param("username") String username, @Param("password")String password);
}
